<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            background: url(./images/你的名字.jpg) no-repeat;
            background-size: 100%;
        }
        div{
            width: 660px;
            height: 100px;
            margin: 300px auto;
            background-color: white;
            text-align: center;
        }
        img{
            margin-top: 5px;
            width: 160px;
            height: 90px;
        }
    </style>
</head>
<body>
    <div>
        <img src="./images/你的名字.jpg" alt="">
        <img src="./images/天气之子.jpeg" alt="">
        <img src="./images/鬼刀.jpeg" alt="">
        <img src="./images/英雄.jpeg" alt="">
    </div>
    <script>
        var imgs = document.getElementsByTagName('img');
        for(var i = 0; i < imgs.length; i++){
            imgs[i].onclick = function(){
                document.body.style.backgroundImage = 'url('+this.src+')';
            }
        }
    </script>
</body>
</html>